package com.liujit.upms.domain.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.liujit.common.domain.result.BaseResult;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
/**
 * @Description 系统认证客户端返回结果
 * @Author liujun
 * @Date 2021-07-02 15:00:06
 */
@Data
@ApiModel(value = "SysOauthClientResult", description = "系统认证客户端返回结果")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class SysOauthClientResult extends BaseResult {

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "用于唯一标识每一个客户端(client)")
    private String clientId;

    @ApiModelProperty(value = "客户端所能访问的资源id集合,多个资源时用逗号(,)分隔")
    private String resourceIds;

    @ApiModelProperty(value = "用于指定客户端(client)的访问密匙")
    private String clientSecret;

    @ApiModelProperty(value = "指定客户端申请的权限范围,可选值包括read,write,trust;若有多个权限范围用逗号(,)分隔")
    private String scope;

    @ApiModelProperty(value = "指定客户端支持的grant_type,可选值包括authorization_code,password,refresh_token,implicit,client_credentials, 若支持多个grant_type用逗号(,)分隔")
    private String authorizedGrantTypes;

    @ApiModelProperty(value = "客户端的重定向URI,可为空, 当grant_type为authorization_code或implicit时, 在Oauth的流程中会使用并检查与注册时填写的redirect_uri是否一致")
    private String webServerRedirectUri;

    @ApiModelProperty(value = "指定客户端所拥有的Spring Security的权限值,可选, 若有多个权限值,用逗号(,)分隔")
    private String authorities;

    @ApiModelProperty(value = "设定客户端的access_token的有效时间值(单位:秒)")
    private Integer accessTokenValidity;

    @ApiModelProperty(value = "设定客户端的refresh_token的有效时间值(单位:秒)")
    private Integer refreshTokenValidity;

    @ApiModelProperty(value = "附加数据")
    private Object additionalInformation;

    @ApiModelProperty(value = "设置用户是否自动Approval操作：1、true。0、false。")
    private Short autoApprove;

    @ApiModelProperty(value = "启用：1、是。0、否。")
    private Short enabled;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
}